<html>
<head>
<title>swfdetect tests</title>
<link type="text/css" rel="stylesheet" href="../../../build/logreader/assets/skins/sam/logreader.css" />
<script type="text/javascript" src="../../../build/yui/yui.js"></script>
</head>
<body class="yui3-skin-sam">
    <h1>SWFDetect Tests</h1>
    <div id="testoutput"></div>
<script type="text/javascript">  
    
YUI({
    base: '../../../build/',
    filter: "raw",
	modules:  { 
		swfdetect: { 
			path: "swfdetect/swfdetect.js" 
		}
	}
}).use('swfdetect', function (Y) {
	var flashMajor = String(Y.UA.flashMajor),
		flashMinor = String(Y.UA.flashMinor),
		flashRev = String(Y.UA.flashRev),
		output = "";
	
	output += "Flash Major: " + flashMajor + "<br/>";
	output += "Flash Minor: " + flashMinor + "<br/>";
	output += "Flash Revision: " + flashRev + "<br/>";
	output += 'Check major version: <br />';
	output += '* Lower: ' + String(Y.SWFDetect.isFlashVersionAtLeast(flashMajor - 1)) + '<br/>';
	output += '* Same ' + String(Y.SWFDetect.isFlashVersionAtLeast(flashMajor)) + '<br/>';
	output += '* Higher? ' + String(Y.SWFDetect.isFlashVersionAtLeast(flashMajor + 1)) + '<br/>';
	output += 'Check minor version: <br />';
	output += '* Lower: ' + String(Y.SWFDetect.isFlashVersionAtLeast(flashMajor, flashMinor - 1)) + '<br/>';
	output += '* Same ' + String(Y.SWFDetect.isFlashVersionAtLeast(flashMajor, flashMinor)) + '<br/>';
	output += '* Higher? ' + String(Y.SWFDetect.isFlashVersionAtLeast(flashMajor, flashMinor + 1)) + '<br/>';
	output += 'Check revision: <br />';
	output += '* Lower: ' + String(Y.SWFDetect.isFlashVersionAtLeast(flashMajor, flashMinor, flashRev - 1)) + '<br/>';
	output += '* Same ' + String(Y.SWFDetect.isFlashVersionAtLeast(flashMajor, flashMinor, flashRev)) + '<br/>';
	output += '* Higher? ' + String(Y.SWFDetect.isFlashVersionAtLeast(flashMajor, flashMinor, flashRev + 1)) + '<br/>';

document.getElementById('testoutput').innerHTML = output;
});

</script>
</body>
</html>
